package com.yoga.manager.admin;

import com.yoga.common.appexception.AppException;
import com.yoga.common.bo.ClassTableBO;
import com.yoga.common.page.PageBO;
import com.yoga.common.qto.ClassTableQTO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by hdx on 2020/9/27.
 */
public interface AdminClassTableManager {
    /**
     * 添加课程表
     * @param classTableBO
     * @return
     * @throws AppException
     */
    ClassTableBO addData(ClassTableBO classTableBO) throws AppException;

    /**
     * 复制上一周的课表到本周使用
     * @param yogaShopId
     * @return
     * @throws AppException
     */
    Boolean copyUpWeekClassTable(Long yogaShopId) throws AppException;

    /**
     * 将本周的课表
     * 复制到下一周使用
     * @param yogaShopId
     * @return
     * @throws AppException
     */
    Boolean copy2NextWeek(Long yogaShopId) throws AppException;

    /**
     * 修改
     * @param classTableBO
     * @return
     * @throws AppException
     */
    Boolean updateData(ClassTableBO classTableBO) throws AppException;

    /**
     * 删除
     * @param classTableId
     * @return
     * @throws AppException
     */
    Boolean deleteData(Long classTableId) throws AppException;

    /**
     * 查询,店铺id不能为空，会员查询时，课程类型不可为空（classType）
     * @param classTableQTO
     * @return
     * @throws AppException
     */
    PageBO<ClassTableBO> findForPage(ClassTableQTO classTableQTO) throws AppException;

    /**
     *  查询周课表
     * @param classTableQTO
     * @return
     * @throws AppException
     */
    PageBO<Map<Date, List<ClassTableBO>>> findForPageWeekGroup(ClassTableQTO classTableQTO) throws AppException;
}
